package com.shop.service.impl;

import java.util.List;

import com.shop.bean.Credit;
import com.shop.dao.ICreditDao;
import com.shop.dao.impl.CreditDaoImpl;
import com.shop.service.ICreditService;

/** 
 * @className: CreditServiceImpl.java
 * @classDescription: 
 * @function: 
 * @author: Victor
 * @createTime: 2012-11-1 下午07:18:31
 * @modifyTime: 
 * @modifyReason: 
 * @since: JDK 1.6
 */
public class CreditServiceImpl implements ICreditService{
	private ICreditDao creditDao = null;
	public int createCredit(Credit credit) throws Exception {
		creditDao = new CreditDaoImpl();
		return this.creditDao.createCredit(credit);
	}

	public int deleteCreditById(long creditId) throws Exception {
		return this.creditDao.deleteCreditId(creditId);
	}

	public List<Credit> queryAllCredit() throws Exception {
		return this.creditDao.queryAllCredit();
	}

	public Credit queryCreditById(long creditId) throws Exception {
		return this.creditDao.queryCreditId(creditId);
	}

	public int updateCredit(Credit credit) throws Exception {
		return this.creditDao.updateCredit(credit);
	}

	public List<Credit> queryAllCredit(int startPage, int pageSize)
			throws Exception {
		return this.creditDao.queryAllCredit(startPage, pageSize);
	}

}
